﻿@model IEnumerable<HanGu.Entity.Advertisement>
@{
    Layout = null;
    int i = 1;
    ViewBag.ViewTitle = "广告";
    var classTypeList = ViewData["ClassTypeList"] as SelectList;
    var SearchParma = ViewData["SearchParma"] as HanGu.Entity.UniversallySearchParam;
}
<html>
<head>
 <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form id="pagerForm" method="get" action="/admin/@ViewData["CurrentController"]/index">
<input type="hidden" name="pageNum" value="1" />
<input type="hidden" name="numPerPage" value="@ViewData["pageSize"]" />
<input type="hidden" name="RowCount" value="@ViewData["RowCount"]" />
<input type="hidden" name="orderField" value="${param.orderField}" />
<input type="hidden" name="Title" value="@SearchParma.Ttile" />
<input type="hidden" name="IntObj1" value="@SearchParma.IntObj1" />
</form>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" id="Form_@ViewData["CurrentController"]" action="/admin/@ViewData["CurrentController"]/index"
    method="post">
    <script>
        $("#IntObj1").val("@Session["classType"]");
    </script>
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    类别：
                </td>
                <td colspan="6">
                    @Html.DropDownList("IntObj1", classTypeList, new { @class = "combox" })
                </td>
                <td align="right">
                    <div class="subBar">
                        <ul>
                            <li>
                                <div class="buttonActive">
                                    <div class="buttonContent">
                                        <button type="submit" name="submit">
                                            检索</button></div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    </form>
</div>
<div class="pageContent">
    <div>
        @*       <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="scriptmain" name="scriptmain"
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
            width="640" height="200">
            <param name="movie" value="Content/Flash/bcastr.swf?bcastr_xml_url=@ViewBag.XmlPath&date=@DateTime.Now">
            <param name="quality" value="high">
            <param name="scale" value="noscale">
            <param name="LOOP" value="false">
            <param name="menu" value="false">
            <param name="wmode" value="transparent">
            <embed src="Content/Flash/bcastr.swf?bcastr_xml_url=@ViewBag.XmlPath&date=@DateTime.Now" width="640" height="200" loop="false"
                quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"
                salign="T" name="scriptmain" menu="false" wmode="transparent"></embed>
        </object>*@
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="scriptmain" name="scriptmain"
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
            width="800" height="200">
            <param name="movie" value="Content/Flash/bcastr.swf?bcastr_flie=@string.Join("|", Model.Select(c => c.FilePath))&bcastr_link=@string.Join("|", Model.Select(c => c.Url))&bcastr_title=@string.Join("|", Model.Select(c => c.Title))&date=@DateTime.Now">
            <param name="quality" value="high">
            <param name="scale" value="noscale">
            <param name="LOOP" value="false">
            <param name="menu" value="false">
            <param name="wmode" value="transparent">
            <embed src="Content/Flash/bcastr.swf?bcastr_flie=@string.Join("|", Model.Select(c => c.FilePath))&bcastr_link=@string.Join("|", Model.Select(c => c.Url))&bcastr_title=@string.Join("|", Model.Select(c => c.Title))&date=@DateTime.Now"
                width="800" height="200" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
                type="application/x-shockwave-flash" salign="T" name="scriptmain" menu="false"
                wmode="transparent"></embed>
        </object>
    </div>
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="add" href="admin/@ViewData["CurrentController"]/Create/0?action=add" target="navTab" title="添加-@ViewBag.ViewTitle">
                <span>添加</span></a></li>
            <li><a class="edit" href="admin/@ViewData["CurrentController"]/Create/{@ViewData["CurrentController"]_id}?action=edit" target="navTab" warn="请选择一个用户" title="修改-@ViewBag.ViewTitle">
                <span>修改</span></a></li>
            <li><a class="delete" href="admin/@ViewData["CurrentController"]/Delete/{@ViewData["CurrentController"]_id}" target="ajaxTodo" title="确定要删除吗？" warn="请选择一个用户">
                <span>删除</span></a></li>
            <li><a class="add" href="admin/@ViewData["CurrentController"]/SaveXml/@SearchParma.IntObj1/@HanGu.Common.RijndaelSecurity.EncryptDES(@ViewBag.XmlPath)" target="ajaxTodo" >
                <span>生成XML</span></a></li>
        </ul>
    </div>
    <table class="table" width="100%" layouth="170">
        <thead>
            <tr class="header">
                <th style="width: 150px">
                    序号
                </th>
                <th>
                    预览图
                </th>
                <th>
                    标题
                </th>
                <th>
                    排序
                </th>
                <th>
                    发布者
                </th>
                <th>
                    发布时间
                </th>
            </tr>
        </thead>
        @foreach (var item in Model)
        {            
            <tr target="@ViewData["CurrentController"]_id" rel="@item.ID">
                <td>
                    @i
                </td>
                <td>
                    <img src="@item.FilePath" border=0 style="height:25px"/>
                </td>
                <td>
                    @item.Title
                </td>
                <td>
                    @item.Order
                </td>
                <td>
                    @item.Updater
                </td>
                <td>
                    <span formatdate="yyyy-MM-dd HH:mm">
                        @item.UpdateTime</span>
                </td>
            </tr>
            i += 1;
        }
    </table>
</div>
@*<div class="panelBar">
    <div class="pages">
        <span>共【@ViewData["RowCount"] 】条,每页显示【@ViewData["pageSize"] 】条</span>
    </div>
    <div class="pagination" targettype="navTab" totalcount="@ViewData["RowCount"] "
            numperpage="@ViewData["pageSize"] " pagenumshown="10" currentpage="@Request["pageNum"] ">
    </div>
</div>*@ 
</body>
</html>